<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/menuAplicacionEmpleado.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateTblarpTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">

            <h:form>
                <p:panel id="panel" styleClass="panelCabeza" header="#{bundle.CreateTblarpTitle}">
                    <p:messages id="msgs"/> 
                    <h:panelGrid columns="2">
                        <h:outputLabel value="#{bundle.CreateTblarpLabel_codArp}" for="codArp" />
                        <p:inputText id="codArp" value="#{tblarpController.selected.codArp}" title="#{bundle.CreateTblarpTitle_codArp}" required="true" requiredMessage="#{bundle.CreateTblarpRequiredMessage_codArp}"/>
                        <h:outputLabel value="#{bundle.CreateTblarpLabel_nomArp}" for="nomArp" />
                        <p:inputText id="nomArp" value="#{tblarpController.selected.nomArp}" title="#{bundle.CreateTblarpTitle_nomArp}" required="true" requiredMessage="#{bundle.CreateTblarpRequiredMessage_nomArp}"/>
                        <h:outputLabel value="#{bundle.CreateTblarpLabel_nitArp}" for="nitArp" />
                        <p:inputText id="nitArp" value="#{tblarpController.selected.nitArp}" title="#{bundle.CreateTblarpTitle_nitArp}" required="true" requiredMessage="#{bundle.CreateTblarpRequiredMessage_nitArp}"/>
                        <h:outputLabel value="#{bundle.CreateTblarpLabel_codCompania}" for="codCompania" />
                        <p:selectOneMenu id="codCompania" value="#{tblarpController.selected.codCompania}"  required="true" requiredMessage="#{bundle.CreateTblarpRequiredMessage_codCompania}">
                            <f:selectItems value="#{tblcompaniaController.itemsAvailableSelectOne}"/>
                        </p:selectOneMenu>
                      
                    </h:panelGrid>

                    <p:commandButton action="#{tblarpController.create}" update="panel" value="#{bundle.CreateTblarpSaveLink}" />

                    <p:commandButton action="#{tblarpController.prepareList}" value="#{bundle.CreateTblarpShowAllLink}" immediate="true"/>
                </p:panel>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
